<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::redirect('/pages/1.html', '/pages/about.html', 301);
Route::redirect('/pages/2.html', '/pages/standard.html', 301);
Route::redirect('/pages/3.html', '/pages/contact.html', 301);
Route::redirect('/pages/4.html', '/pages/adservice.html', 301);
Route::redirect('/pages/5.html', '/pages/disclaimer.html', 301);

Route::get('/', 'PagesController@index')->name('root');
Route::get('/goto/{name}', 'PagesController@goTos')->name('goto');
Route::get('/top', 'TopController@index')->name('top');
Route::get('/site', 'SiteController@index')->name('site.index');

Route::paginate('/search/{action}/{name}', 'SearchController@index')->name('search');
Route::paginate('/site/{id}', 'SiteController@listId')->name('site.listId');
Route::paginate('/site/{son}/son/{id}', 'SiteController@listSonId')->name('site.listId');
Route::get('/siteinfo-{id}.html', 'SiteController@show')->name('site.show');

Route::paginate('/area/{id}', 'SiteController@area')->name('site.area');
Route::paginate('/tags/{name}', 'SiteController@tag')->name('site.tag');

Route::get('/article', 'ArticleController@index')->name('article.index');
Route::paginate('/article/{id}', 'ArticleController@listId')->name('article.listId');
Route::get('/artinfo-{id}.html', 'ArticleController@show')->name('article.show');

Route::get('/pages/{name}.html', 'PagesController@pages')->name('pages');
Route::get('/icp/{id}', 'Api\IcpController@search')->name('icp');
Route::get('/seo/{id}', 'Api\RankController@search')->name('seo');
Route::get('/snapshot/{id}', 'Api\ShotController@search')->name('snapshot');

Route::get('/submit', 'SiteController@submit')->name('submit');
Route::post('/submit', 'SiteController@submitCreate')->name('submit.create');
